<template>
    <div>
            <el-dialog
            title="广告位代码"
            :visible.sync="dialogVisiable"
            :before-close="beforeClose"
            width="30%"
            >
            <span v-html="dialogHtml"> </span>
            <span slot="footer" class="dialog-footer">                
                <el-button type="primary" @click="closeDialog">确 定</el-button>
            </span>
            </el-dialog>
    </div>
</template>

<script>
export default {
 components: {},
    props:{
        'visiable':{ type : Boolean, default: false },
        "adsplaceCode":{ type: String, default:""}
    },
    data(){
        return {
           
        }
    },
    computed:{
        dialogHtml(){
            return this.adsplaceCode
        },
        dialogVisiable:  {
            get(){
                return this.visiable;
            },
            set(value){
                 this.$emit("on-close-dialog", value)
            }
        }
    },
   
     methods: {
        closeDialog(){
            this.$emit("on-close-dialog", false)
        },
       beforeClose(done){          
           done();
       },
    }
}
</script>
